473,466 Members | 1,658 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Folder tree menu

Hi. I was wondering if someone here could help me. My web site has a very simple folder tree menu bar. Example:

<a id="club_t" href="##" onclick="return Outline(this)"><img id="club_i" alt="" border="0" src="fold.gif">Club&nbsp;Links</a><br>
<div id="club_s" class="off">
<a href="articles.htm" target="main">Articles/Cartoons</a><br>
<a href="photo1.htm" target="main">Astro&nbsp;Images</a><br>
<a href="links.htm" target="main">Astro&nbsp;Links</a><br>
<a href="events.htm" target="main">Club&nbsp;Events</a><br>
<a href="photo2.htm" target="main">Club&nbsp;Images</a><br>
<a href="custom.htm" target="main">Custom&nbsp;Links</a><br>
<a href="membership.htm" target="main">Membership</a><br>
</div>

In the style sheet, class.off is hidden, class.on is visible. Each id indicates the <a>, <img>, or <div>. The user clicks <a>: If the folder is closed, it is opened, Outline() changes <img src="open.gif"> and <div class="on">. If the user clicks <a> again, everything is reversed.

I want to make a modification. For certain folders, when the user moves the mouse cursor over the <a>, I want the folder to open. But I don't want to folder to close until the mouse cursor is not only off the <a>, but also off the <div> (or clicked a link within the <div>).

I've tried to look at other navigation menu bars, but can't figure out how they do it. Any advice would be greatly appreciated...Dennis
Jul 23 '05 #1
6 2713
On Fri, 4 Feb 2005 21:54:01 -0500 Dennis Allen wrote:
Hi. I was wondering if someone here could help me. My web site has a
very simple folder tree menu bar. Example: <a id="club_t" href="##" onclick="return Outline(this)"><img
id="club_i" alt="" border="0" src="fold.gif">Club&nbsp;Links</a><br>
<div id="club_s" class="off">
<a href="articles.htm" target="main">Articles/Cartoons</a><br>
<a href="photo1.htm" target="main">Astro&nbsp;Images</a><br>
<a href="links.htm" target="main">Astro&nbsp;Links</a><br>
<a href="events.htm" target="main">Club&nbsp;Events</a><br>
<a href="photo2.htm" target="main">Club&nbsp;Images</a><br>
<a href="custom.htm" target="main">Custom&nbsp;Links</a><br>
<a href="membership.htm" target="main">Membership</a><br>
In the style sheet, class.off is hidden, class.on is visible. Each id
indicates the <a>, <img>, or <div>. The user clicks <a>: If the folder
is closed, it is opened, Outline() changes <img src="open.gif"> and
<div class="on">. If the user clicks <a> again, everything is
reversed. I want to make a modification. For certain folders, when the user
moves the mouse cursor over the <a>, I want the folder to open. But I
don't want to folder to close until the mouse cursor is not only off
the <a>, but also off the <div> (or clicked a link within the <div>). I've tried to look at other navigation menu bars, but can't figure out
how they do it. Any advice would be greatly appreciated...Dennis

Have I got a deal for you.

www.4thorder.us

Take a look at the script Mike Falatine offers.
He makes good use of a simple <ul><li> menu tree to any level you want.
You'll see how it all comes nicely together.

In your case, what you're missing is a simple thing to add in.
<div class="on" style="display:block;">
<div class="off" style="display:none;">

Now what you need to do is to switch them on/off as needed.
www.somestuff.batcave.net
A short script can do that easily.
And there are ways of handling that in CSS as well.

You may want to post a working example somewhere for others to see what
you're doing.
Don't have space on the web?
www.batcave.net get 50mb for free.

Jul 23 '05 #2

"Richard" <An*******@127.001> wrote in message news:cu*********@news4.newsguy.com...
On Fri, 4 Feb 2005 21:54:01 -0500 Dennis Allen wrote:

In your case, what you're missing is a simple thing to add in.
<div class="on" style="display:block;">
<div class="off" style="display:none;">


That's already defined in the css, using <a onclick="return Outlline()"> to switch between the on and off classes. For certain folders, I want to use mouseover and mouseout. Again, <a mouseover> to open the <div>, but the mouse cursor has to be off everything (or a <div> link clicked) before closing the <div>.

Jul 23 '05 #3
"Dennis Allen" <de****@dennisallen.com> skrev i meddelandet
news:11*************@corp.supernews.com...
Hi. I was wondering if someone here could help me. My web site has a very
simple folder tree menu bar. Example:

<a id="club_t" href="##" onclick="return Outline(this)"><img id="club_i"
alt="" border="0" src="fold.gif">Club&nbsp;Links</a><br>
<div id="club_s" class="off">
<a href="articles.htm" target="main">Articles/Cartoons</a><br>
<a href="photo1.htm" target="main">Astro&nbsp;Images</a><br>

Incidentally: if you add white-space:nowrap in the a:link CSS, you don't
have to bother with &nbsp;.

Joakim Braun
Jul 23 '05 #4
Dennis Allen wrote:
"Richard" <An*******@127.001> wrote in message news:cu*********@news4.newsguy.com...
On Fri, 4 Feb 2005 21:54:01 -0500 Dennis Allen wrote:

In your case, what you're missing is a simple thing to add in.
<div class="on" style="display:block;">
<div class="off" style="display:none;">

That's already defined in the css, using <a onclick="return Outlline()"> to switch
between the on and off classes. For certain folders, I want to use mouseover and
mouseout. Again, <a mouseover> to open the <div>, but the mouse cursor has to be
off everything (or a <div> link clicked) before closing the <div>.


Put an onmouseover in the a tag and the corresponding div tag that sets
it to visible. onmouseout of both make the div hidden. When the mouse
leaves the a tag the onmouseout will hide it and the onmouseover of the
div will keep it visible.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #5
Ah. Tried it and it works. I thought maybe the <a mouseout> would hide the <div> before the <div mouseover> could fire. Nope. Thanks...Dennis

"Randy Webb" <Hi************@aol.com> wrote in message news:AO********************@comcast.com...
Dennis Allen wrote:
"Richard" <An*******@127.001> wrote in message news:cu*********@news4.newsguy.com...
On Fri, 4 Feb 2005 21:54:01 -0500 Dennis Allen wrote:

In your case, what you're missing is a simple thing to add in.
<div class="on" style="display:block;">
<div class="off" style="display:none;">



That's already defined in the css, using <a onclick="return Outlline()"> to switch
between the on and off classes. For certain folders, I want to use mouseover and
mouseout. Again, <a mouseover> to open the <div>, but the mouse cursor has to be
off everything (or a <div> link clicked) before closing the <div>.


Put an onmouseover in the a tag and the corresponding div tag that sets
it to visible. onmouseout of both make the div hidden. When the mouse
leaves the a tag the onmouseout will hide it and the onmouseover of the
div will keep it visible.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #6
Thanks...Dennis

"Joakim Braun" <jo**********@jfbraun.removethis.com> wrote in message news:FC*******************@nntpserver.swip.net...
"Dennis Allen" <de****@dennisallen.com> skrev i meddelandet
news:11*************@corp.supernews.com...
Hi. I was wondering if someone here could help me. My web site has a very
simple folder tree menu bar. Example:

<a id="club_t" href="##" onclick="return Outline(this)"><img id="club_i"
alt="" border="0" src="fold.gif">Club&nbsp;Links</a><br>
<div id="club_s" class="off">
<a href="articles.htm" target="main">Articles/Cartoons</a><br>
<a href="photo1.htm" target="main">Astro&nbsp;Images</a><br>

Incidentally: if you add white-space:nowrap in the a:link CSS, you don't
have to bother with &nbsp;.

Joakim Braun

Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jo | last post by:
I don't know if this can be done.. But here is what i am trying to do... I have a tree menu on a frameless page. I have the menu on the right hand side and a CGI web form post on the left....
3
by: scott | last post by:
I'm creating a tree menu that uses FSO to read folders, subfolders and files. I'd like for each folder to have capabilty of being either Level 1,2,3,4 or 5 security. The 5 Levels are my security...
7
by: johkar | last post by:
I am confused on childNodes or children. When you have nested lists, I would think it would all be one list in the Dom, this doesn't seem to be the case. So how do you traverse an unordered list?...
4
by: Sergio Millich | last post by:
I have an annoyîng problem with a javascript tree. When you scroll down to the bottom of the tree and click to open a node the tree is refreshed and scrolls back to the top, hiding the node. Is...
0
by: Tree menu using XML | last post by:
I have one XML file that has nodes and sub node and each and every node has the attribute call visible if its value is true then diplay this node else don't display thid node, but this condition i...
4
by: Tarique Jawed | last post by:
Alright I needed some help regarding a removal of a binary search tree. Yes its for a class, and yes I have tried working on it on my own, so no patronizing please. I have most of the code working,...
0
by: John H. | last post by:
In effort to understand (Outlook) MAPI folder tree structure wrote simple linear code below to navigate tree. Successive "...Folders.GetNext()"'s return same folder at all levels of tree. What...
1
by: w.p. | last post by:
Hello! I have some trouble with my GUI. I have left panel with foldpanelbar, but i need one item but not collapsed - simple button. I split my left panel into two foldpanelbars with one button...
1
by: preet | last post by:
i tried to find tutorials to build a working tree menu from contents of current folder but was unable to find any, neither did i find any working scrit to build on can anyone suggest something ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.